package hai.com.android_test;

import android.app.Application;
import android.test.ApplicationTestCase;

import java.io.File;
import java.io.IOException;

/**
 * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
 */
public class ApplicationTest extends ApplicationTestCase<Application> {
    public ApplicationTest() {
        super(Application.class);
//        test(1,2);
        getPath();
    }
    void test(int a,int b){
        assertEquals(a,b);
    }
    void getPath(){
        File cacheDir = getContext().getCacheDir();
        File file=new File(cacheDir,"test");
        if (file == null) {
            try {
                file.createNewFile();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        System.out.println(file.getPath());
    }
}